<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>.::IFConnect::.</title>
        <link href="../styles/mainadmin.css" type="text/css" rel="stylesheet" media="all" />      
    </h:head>
    <h:body>

        <div id="cabecalho">
            <a href="principalAdmin.xhtml" alt="Administração" title="Voltar a página principal de administração"><img src="../images/topadmin.png" width="700" height="100" alt="Área Administrativa" /></a>
            <br />
            <div id="logincontrol">
                <h:panelGrid columns="2">
                    <h:outputText value="Bem-vindo #{usuariologin.usuario.nome} #{usuariologin.usuario.sobrenome}  " />
                    <h:form>
                        <h:commandLink value="Logoff" action="#{usuariologin.logout()}"/>
                    </h:form>
                </h:panelGrid>
            </div>
        </div>
        <div id="estrutura">
            <div id="conteudo">

                <h2>Painel de administração</h2>

                <h3>Configuração de Conta</h3>
                <h:form id="cad">

                    <p:growl/>
                    <p:fieldset legend="Preencha todos os campos:">
                        <h:panelGrid  columns="2">

                            <h:outputLabel  value="Senha anterior:" for="senhaant"/>
                            <p:password id="senhaant" value="#{usuariologin.senhaatual}" required="true" styleClass="campoTexto" />  

                            <h:outputLabel  value="Nova senha:" for="senha1"/>
                            <p:password id="senha1" value="#{usuariologin.novasenha1}" feedback="true"   
                        promptLabel="Preencha o campo com a senha desejada!" weakLabel="Senha fraca!"  
                        goodLabel="Boa senha!" strongLabel="Ótima senha!" styleClass="campoTexto" required="true" />  
                            
                            <h:outputLabel  value="Confirme a nova senha:" for="senha2"/>
                            <p:password id="senha2" value="#{usuariologin.novasenha2}" feedback="true"   
                        promptLabel="Preencha o campo com a senha desejada!" weakLabel="Senha fraca!"  
                        goodLabel="Boa senha!" strongLabel="Ótima senha!" styleClass="campoTexto" required="true" /> 
                            
                            <p:commandButton value="Enviar" update=":cad" action="#{usuariologin.alterarSenha()}" image="ui-icon ui-icon-disk"/>
                        </h:panelGrid>
                    </p:fieldset>
                    
                </h:form>

            </div>
        </div>
    </h:body>
</html>